package shu;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18128
 * Date: 2023-09-24
 * Time: 12:35
 */
public class Booklist {
    private book brr[];//定义书的书架
    private int num;//当前书架上书本数量
    public Booklist()//默认书架上一开始就有三本书
    {
      brr=new book[10];//默认一开始书架只能放10本书
        brr[0]=new book("数据结构","hjx",19,"学习");
        brr[1]=new book("c语言" ,"hjh",39,"学习");
        brr[2]=new book("java入门","whx",34,"学习");
        num=3;
    }

    public book getBrr(int i) {
        return brr[i];
    }

    public void setBrr(book[] brr) {
        this.brr = brr;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
    public void jiashu(int i,book b)
    {
        brr[i]=b;
    }

}
